package com.yanqu.road.server.cmd.winery;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.winery.WineryProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.winery.WineryModule;
import com.yanqu.road.server.protocol.ClientProtocol;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = GameProtocol.S_WINERY_STAFF_LIST, desc = "酒坊员工能力列表")
public class WineryStaffListCmd extends AbstractCommand {


    private WineryProto.WineryStaffListRespMsg.Builder respMsgBuilder;


    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        this.respMsgBuilder = player.getModule(WineryModule.class).staffList();
    }

    @Override
    public void sendData(GamePlayer player) {
        player.sendPacket(ClientProtocol.U_WINERY_STAFF_LIST, this.respMsgBuilder);
    }

}
